<%--
  Created by IntelliJ IDEA.
  User: ttxs
  Date: 2023/8/7
  Time: 8:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link href="${pageContext.request.contextPath}/statics/css/main.css" rel="stylesheet">
    <script src="${pageContext.request.contextPath}/statics/js/jquery.min.js"></script>
    <script>
        $(function () {
            $("form").submit(function () {
                if ($("[name=account]").val() == "") {
                    alert("账号不能为空");
                    return false;
                }
                if ($("[name=password]").val() == "") {
                    alert("密码不能为空");
                    return false;
                }
                return true;
            })
        })
    </script>
</head>
<body>
<h1>登录</h1>
${msg}
<form action="${pageContext.request.contextPath}/users/login" method="post">
    <table>
        <tr>
            <td>账号</td>
            <td><input name="account"></td>
        </tr>
        <tr>
            <td>密码</td>
            <td><input name="password" type="password"></td>
        </tr>
        <tr>
            <td colspan="2">
                <input value="登录" type="submit">
            </td>
        </tr>
    </table>
</form>
</body>
</html>
